package com.example.optimizeapplication.receive;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

//定义一个标志的广播接收器
public class StandarReceiveer extends BroadcastReceiver {

    public static final String standardAction = "broadcast_main";
    //一旦接收广播，就会触发接收器的onreceive方法
    @Override
    public void onReceive(Context context, Intent intent) {

        if(intent != null && intent.getAction().equals(standardAction));
        Log.d("sp", "收到一个标准广播 ");
    }
}
